<template>
  <!-- 基本信息 -->
  <div style="height:520px;">
    <FormPanel
      :list="initForm"
      :cols="3"
      formType="show"
      :labelWidth="90"
      :isSubmitBtn="false"
      @formChange="formChangeHandle"
      class="mtop"
    />
  </div>
</template>

<script>
import { dictionary } from '@/utils/dictMixin';
export default {
  mixins: [dictionary],
  props: {
    value: {
      type: Number,
      required: true
    },
    infoBasic: {
      type: String,
      required: true
    }
  },
  data() {
    return {
      initForm: this.initFormFun(),
      formValue: {}
    };
  },
  created() {
    this.init();
  },
  methods: {
    //初始化数据
    init() {
      console.log('行id---->', this.value);
      console.log('是否编辑---->', this.infoBasic);
      //赋值
      // this.initForm.forEach(x => {
      //     x.initialValue = data.row[x.fieldName];
      // });
    },
    //搜索数据
    initFormFun() {
      return [
        {
          type: 'INPUT',
          label: '客户公司名称',
          fieldName: 'field1',
          initialValue: ''
        },
        {
          type: 'INPUT',
          label: '项目名称',
          fieldName: 'field2',
          initialValue: '',
        },
        {
          type: 'INPUT',
          label: '项目编号',
          fieldName: 'field3',
          initialValue: ''
        },
        {
          type: 'INPUT',
          label: '项目生效日期',
          fieldName: 'field4',
          initialValue: ''
        },
        {
          type: 'INPUT',
          label: '经销商',
          fieldName: 'field5',
          initialValue: ''
        }
      ];
    },
    formChangeHandle(val) {
      this.formValue = val;
    }
  }
};
</script>